<?php

namespace app\controller\bossManager;

use app\validate\PageValidate;
use app\validate\PrivacyValidate;
use app\service\PrivacyService;

class PrivacyController extends WebBossController{
    public function initValidate(){        
        $this->validate = new PrivacyValidate();
    }

    public function list_action(){  
        // $input = $this->check();        
        $input = [];
        $page = $this->check('pageInfo',null,(new PageValidate()));        
        $data = PrivacyService::getListInfo($input,$page);
        $total = PrivacyService::getListCountInfo($input);
        return self::ok(self::formatPageData($page,$total,$data));    
    }

    public function set_action(){  
        $input = $this->check();
        $res = PrivacyService::edit($input); 
        return self::ok($res);
    }

}